{% extends "base.html" %}
{% block css %}
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/0.4.2/style/weui.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/sweetalert.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/addr.css') }}">
{% endblock %}
{% block js %}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery.cookie.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/countdown.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/moment.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/sweetalert.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/sha1.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/addr.js') }}"></script>
{% endblock %}
{% block content %}
<button class="weui_btn weui_btn_primary" onclick="getWxAddr()" >选择收货地址</button>
<div class="u_address">
    <i class="fa fa-home fa-lg" style="float: left;margin-top: 16px;" aria-hidden="true"></i>
    <div class="address" id="dt_address">
        <span style="font-size: 16px;">
        {%if addr %}
            <span class="name">{{addr.userName}}</span>
            <span class="tel">{{addr.telNumber}}</span>
            <span class="address_txt address_txt_top">{{addr.proviceFirstStageName+addr.addressCitySecondStageName+addr.addressCountiesThirdStageName}}</span>
            <span class="address_txt">{{addr.addressDetailInfo}}</span>
        {%else%}
            请先选择收货地址
        {%endif%}
        </span>
    </div>
</div>

<div class="weui_cells">
        <img src="/static/img/items/{{item.id}}/title.jpg" style="width: 30%; height: 30%;">

    <div style="margin-left: 10px; display: inline-block;">
        <div><h4 class="title" id="title">{{item.title}}</h4></div>
        <span id="itemid" style="display: none;">{{item.id}}</span>
        <div class="item_info"><span><strong style=""><i class="fa fa-yen fa"></i>{{item.now_price}}</strong></span>
        </div>
    </div>

</div>
<div class="weui_cells">
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary">
            <p>数量</p>
        </div>
        <div class="weui_cell_ft" id="quantity">{{quantity}}</div>
    </div>
</div>
{%if expire%}
<div class="weui_cells">
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary">
            <i class="fa fa-clock-o"></i><span id="countdown"></span>
            <span id="expire" style="display: none">{{expire}}</span>
        </div>
    </div>
</div>
{%endif%}
<div class="address_heji">
    <div style="margin-top: 10px">
        <span>实付款：</span>
        <span><strong style="color: red;font-size: 24px;"><i class="fa fa-yen"></i>{{money}}</strong></span>
        <button class="weui_btn weui_btn_primary" id="buy" style="width: 40%; float: right;" >确认付款</button>
    </div>

</div>
{% endblock %}
